import requests

query = input('请输入查询内容：')
url = f'https://m.sogou.com/web/searchList.jsp?s_from=pcsearch&keyword={query}'

header_dic = {
    'user-agent' : 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36 Edg/138.0.0.0'
}
resp = requests.get(url, headers=header_dic)

print(resp)
print(resp.text)
resp.close()